<template>
    <div>原型</div>
</template>
<script>
export default {
    data() {
        
    },
    methods(){
        this.proto()
    },
    methods:{
     
     proto(){
        class Prote {
              constructor(name,age){
                    this.name = name 
                    this.age = age
              }
              say(){
                console.log('123232')
              }
        }
        Prote.prototype.type='add'
        let p1 = new Prote('李金龙',23)
        let p2 = new Prote('xxx',22)
        console.log(p1.name,p1.type)
        console.log(p2.name,p2.type)
     },
    }
}
</script>
